<template>

<div>
<van-nav-bar
  title="标题"
  left-text="返回"
  right-text="按钮"
  left-arrow
  @click-left="onClickLeft"
/>

<van-cell-group>
  <van-field
    v-model="username"
    label="用户名"
    icon="clear"
    placeholder="请输入用户名"
    required
  />

  <van-field
    v-model="password"
    type="password"
    label="密码"
    placeholder="请输入密码"
    required
  />
</van-cell-group>
<van-cell-group>
    <van-button type="primary" @click="search">查询</van-button>
</van-cell-group>
</div>
</template>

<script>
import Vue from 'vue';
import { Field } from 'vant';
import { NavBar } from 'vant';
import { Button } from 'vant';
import { Toast } from 'vant';
import { Cell, CellGroup } from 'vant'

Vue.use(NavBar);
Vue.use(Field);
Vue.use(Button);
Vue.use(Toast);
Vue.use(Cell).use(CellGroup);

export default{
    data() {
        return{
            username:"myd",
            password:"myd"
        }
    },
  methods: {
    onClickLeft() {
      this.$router.push({name: 'Goods'});
    },
    search(){
        // Toast("查询");
        this.$router.push({name: 'Ybxx'});
    }
  }
}
</script>

<style>

</style>